<template>
  <h1>欢迎登录使用！</h1>
  <el-carousel :interval="4000" type="card" height="500px">
    <el-carousel-item v-for="(item, index) in images" :key="index">
      <img :src="item.img" alt="Image" style="width: 100%; height: 100%; object-fit: cover;">
    </el-carousel-item>
  </el-carousel>
</template>

<script setup>
import { ref } from 'vue';

const images = ref([
  {img: '/src/assets/1.jpg'},
  {img: '/src/assets/2.jpg'},
  {img: '/src/assets/3.jpg'},
  {img: '/src/assets/4.jpg'},
  {img: '/src/assets/5.jpg'},
]);
</script>

<style scoped>
h1 {
  font: 30px sans-serif;
  font-weight: bold;
  color: #032693;
}
.el-carousel__item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.el-carousel__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>
